﻿using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata.Builders;
using Windows.WorkFlow.Domain;

namespace Windows.WorkFlow.Infrastructure.EFCore.Mappings
{
    public class FlowInstanceMapping : IEntityTypeConfiguration<FlowInstance>
    {
        public void Configure(EntityTypeBuilder<FlowInstance> builder)
        {
            builder.HasQueryFilter(x => x.IsEnable);
            builder.Property(x => x.CurrentNodeId).HasMaxLength(50);
            builder.Property(x => x.CurrentNodeName).HasMaxLength(50);
            builder.Property(x => x.FlowId);
        }
    }
}
